#define _CRT_SECURE_NO_WARNINGS 1
#include<stdio.h>
void print_n(int n) {
	int arr[10] = {0};
	int i = 0;
	while (n > 0) {
		arr[i] = n % 10;
		n /= 10;
		i++;
	}
	//printf("%d", i);
	for (i; i > 0; i--) {
		printf("%d ", arr[i-1]);
	}
}
int main()
{
	int n = 0;
	scanf("%d", &n);
	print_n(n);
	return 0;
}